package com.study.www.dao;

import com.study.www.entity.Dept;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * @author : 89007337.zhuyanpeng
 * @date :  2019/8/20    22:49
 **/
/*
* @Repository 需要在启动类使用 MapperScan 进行扫描指定
* @Mapper 不需要
* */
@Repository
public interface DeptMapper {

    @Select("SELECT name FROM SYS_DEPT WHERE id = #{id}")
    String findNameById(@Param("Id") String id);

    Dept findById(@Param("Id") String id);

    void insert(Dept dept);
}
